package com.gj.demojuc.chap02;

/**
 * 演示synchronized实现可重入锁
 */
public class ReentrantLockDemo1 {
    public synchronized void a(){
        this.b();
        System.out.println("a");
    }
    public synchronized void b(){
        System.out.println("b");
    }

    public static void main(String[] args) {
        new ReentrantLockDemo1().a();
    }
}
